//
//  cameraViewController.h
//  iSeeColor
//
//  Created by Narbeh Shahnazarian on 10/20/12.
//  Copyright (c) 2012 Wyatt Gosling. All rights reserved.
//

#import <UIKit/UIKit.h>

/*
 The CameraViewContoller class will act as the main camera interface for viewing photos from the photo library and taking pictures.  It will contain two outlets: one for switching buttons and the other for siplaying the images.  The class will also implement one action, camera, to preform the aforementioned functions of the class.  
 */
@interface cameraViewController : UIViewController<UIImagePickerControllerDelegate, UINavigationControllerDelegate, UIPopoverControllerDelegate>
{
    
    IBOutlet UISegmentedControl *sc;
    IBOutlet UIImageView *imageView;
    UIImagePickerController *picker;
    
}

//the controller needed in case of an iPad with no camera is being used 
@property (nonatomic, retain) UIPopoverController *popover;

/*
 Description: the IbAction camera represents the main function of our application: image processing.  Here the image will be grabbed from the appropriate source, be transformed through our filter, then shown on screen and saved to the users photo library.
 Args: none.
 Purpose: to act as the action for activationg the camera interface.
 Returns: the action corresponing to the segmented control on the action screen interface.
 Pre: n/a
 Post: n/a
 
 */
- (IBAction)camera;


/*
 Description: This method takes the picture from the photo library, passes it through the daltonization algorithm, saves the photo to the photolibrary and then pushes the photo to the screen.
 Args: UIImagePickerController, NSDictionary.
 Purpose: to call the daltonization algorithm and send a photo through it.
 Returns: none.
 Pre: n/a
 Post: n/a
 
 */
-(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info;


-(void) imagePickerControllerDidCancel:(UIImagePickerController *)picker;


- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil;


- (void)viewDidLoad;


- (void)viewDidUnload;


- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;

@end
